package com.yuhanginfo.modules.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.yuhanginfo.common.service.CrudService;
import com.yuhanginfo.modules.sys.entity.Waybill;
import com.yuhanginfo.modules.sys.dao.WaybillDao;

/**
 * 订单详情Service
 * @author yangs
 * @version 2017-09-19
 */
@Service
@Transactional(readOnly = true)
public class WaybillService extends CrudService<WaybillDao, Waybill> {
    @Autowired
    private WaybillDao waybillDao;
    
	
	
	@Transactional(readOnly = false)
	public void save(Waybill waybill) {
		super.save(waybill);
	}
	
	@Transactional(readOnly = false)
	public void delete(Waybill waybill) {
		super.delete(waybill);
	}

	public List<Waybill> selectByOrderCode(String code) {
		
		return waybillDao.selectByOrderCode2(code);
	}

	public List<Waybill> selectByLogisticsCode(String wuCode) {
		
		return waybillDao.selectByLogisticsCode(wuCode);
	}
	
	public List<Waybill> selectByWarehouseId(String id) {
		
		return waybillDao.selectByWarehouseId(id);
	}
	
}